package com.ysd.lis.controller.qc;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.qc.QcInstrItem;
import com.ysd.lis.request.CommonPageDto;
import com.ysd.lis.service.qc.QcInstrItemRuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工表
 * 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2023-10-19
 */
@Api(tags = "仪器质控项目规则")
@RestController
@RequestMapping("/api/qc/qcInstrItemRule")
public class QcInstrItemRuleController extends BaseController {

    @Autowired
    QcInstrItemRuleService qcInstrItemRuleService;

    @ApiOperation("查询")
    @GetMapping("/findInstrItemRuleList")
    public Result findInstrItemRuleList(CommonPageDto pageParam){
        return qcInstrItemRuleService.findInstrItemRuleList(pageParam);
    }

    @ApiOperation("修改")
    @PostMapping("/saveOrUpdateInstrItemRule")
    public Result saveOrUpdateInstrItemRule(@RequestBody QcInstrItem item) {
        return qcInstrItemRuleService.saveOrUpdateInstrItemRule(item);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteInstrItemRuleList")
    public Result batchDeleteInstrItemRuleList(@RequestBody QcInstrItem dto){
        return  qcInstrItemRuleService.batchDeleteInstrItemRuleList(dto);
    }

}
